﻿Option Strict On
Option Explicit On
Option Infer On

Imports System
Imports System.Linq
Imports System.Collections.Generic
Imports GenDotNet.TemplateSupport.Strings

Public Class InterfaceInfo
   Inherits BaseInfo

   Public Sub New(ByVal name As String)
      MyBase.New(name, TemplateSupport.Scope.Unknown)
   End Sub

End Class

Public Class InterfaceInfoCollection
   Inherits List(Of InterfaceInfo)

   Public Overloads Sub Add(ByVal className As String)
      Me.Add(New InterfaceInfo(className))
   End Sub

End Class

Namespace VB
   Public Module InterfaceInfoExtensions

      <Runtime.CompilerServices.Extension()> _
      Public Function OutputDeclaration( _
               ByVal infos As InterfaceInfoCollection) _
               As String
         Return (From info In infos Select _
                <code>
      Implements <%= info.Name %>
                </code>).ConcatenateWithNewLine()
      End Function

   End Module
End Namespace

Namespace CSharp
   Public Module InterfaceInfoExtensions
      <Runtime.CompilerServices.Extension()> _
      Public Function OutputDeclaration( _
               ByVal infos As InterfaceInfoCollection) _
               As String
         Return (From info In infos Select _
                <code><%= info.Name %></code>).ConcatenateWithComma()
      End Function

   End Module
End Namespace


